package com.ruoyi.common.core.utils;


import jakarta.validation.ConstraintValidatorContext;

/**
 * @Author: Painter
 * @project_name: RuoYi-Cloud
 * @system_login: sunshine
 * @time: 2024/2/23 10:35
 */


/**
 * 参数校验 - 重置提示信息工具类
 */
public class ResetMessageUtil {

    /**
     * 重置提示信息
     */
    public static void reset(ConstraintValidatorContext context, String message) {
        context.disableDefaultConstraintViolation();
        context.buildConstraintViolationWithTemplate(message).addConstraintViolation();
    }
}
